How to...

# Create an Apple Macintosh icon

Icons targeting Mac OS X should be designed in several sizes and color depths, just like icons for Windows. This is to ensure that they look good on your Mac whether displayed in small or large sizes. The default extension for the Apple Icon Image Format is ICNS. These files may only contain pages which fall into one of the following categories:

| Size | Color depth
| 1024x1024 | 32-bit
| 512x512 | 32-bit
| 256x256 | 32-bit
| 128x128 | 32-bit
| 48x48 | 32-bit
a | 48x48 | 256 colors
a | 48x48 | 16 colors
a | 48x48 | Black and white
| 32x32 | 32-bit
b | 32x32 | 256 colors
b | 32x32 | 16 colors
b | 32x32 | Black and white
| 16x16 | 32-bit
c | 16x16 | 256 colors
c | 16x16 | 16 colors
c | 16x16 | Black and white
d | 16x12 | 256 colors
d | 16x12 | 16 colors
d | 16x12 | Black and white

- Neither can your document contain pages failing to meet one of the above formats, nor can it contain multiple pages of the same format! For example, you cannot store two pages in your ICNS file which are both 48x48 @ 32-bit - that wouldn't make sense anyway.

- Here 256 colors means that you must use a standard Mac palette! We recommend you load this standard palette to the swatches (it is contained in Swatches/ICNS-256-colors.swa) so you can pick colors from it for drawing. (For more information on how you can access the Swatches, see this and look for the word swatches.)

- 16 colors also means that you must use a standard palette. Using a custom set of 16 colors is not allowed. This palette can be loaded from Swatches/ICNS-16-colors.swa. Note that it is not a subset of the 256-color ICNS palette!

- It is important that if none of two ICNS pages is 32-bit, but they are of the same size, then they must have the same transparency mask, meaning that if a pixel is transparent in one of them, then the corresponding pixel is transparent in the other one. For example, these pages are allowed for formats 48x48 @ 16 colors and 48x48 @ Black and white:

  but these are not:

  The first page of the second document contains opaque pixels in the letters g and e which are transparent in the second page of the second document (In addition, there are such pixels vice versa.) This restriction on alpha channels does not apply for 32-bit pages. Those formats which must have the same transparency mask are marked with the same letter in the table of icon formats above.

- When re-opening a previously saved ICNS file, sometimes it may seem that GFIE has inserted random black pages. This is because in order to save pages with 16 colors or 256 colors, image editors must always insert a Black and white page of the corresponding size if none are present, since this is where the transparency mask is stored for those other pages.

## Converting an existing image to a Macintosh icon

1. Open your existing image file.
2. Should it have multiple pages, select the page you want to create the new icon from.
3. Choose the menu item Icon|Create Mac icon from image and put a check in the boxes corresponding to the formats you want to create.

You should then edit the individual pages to ensure that your icon will look good when displayed resized.

## Testing your icon

See this article.